<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>六西格玛知识管理</title>
<link href="<?php echo $this->baseUrl ?>/public/style/style.css" rel="stylesheet" type="text/css">
<link href="<?php echo $this->baseUrl;?>/public/style/daterangepicker.css" rel="stylesheet" type="text/css" />
<link href="<?php echo $this->baseUrl;?>/public/style/jquery-ui.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<?php echo $this->baseUrl;?>/public/scripts/jquery.js"></script>
<script type="text/javascript" src="<?php echo $this->baseUrl;?>/public/scripts/daterangepicker.js"></script>
<script type="text/javascript" src="<?php echo $this->baseUrl;?>/public/scripts/jquery-ui.js"></script>
</head>
<body>
<!--头部-->
<?php echo $this->partial('common/header.html', array('template'=>$this->template, 'baseUrl'=>$this->baseUrl)) ?>

<!--主体-->
<div class="main-box" id="mainBox">
    <div class="third-menu">
        <?php echo $this->partial('common/operation.html', array('template'=>$this->template, 'baseUrl'=>$this->baseUrl)) ?>
        <div class="menu-title"><span class="icon"></span>批量导入管理</div>
    </div>
    <div class="separate-line"></div>
  
	<div class="main-form" style="margin-bottom:10px;">
        <?php $model = array('class'=>'班级模块数据','companys'=>'客户模块数据','department'=>'教师专业数据','teacher'=>'教师模块数据','tag'=>'标签模块数据','student'=>'学生模块数据','project'=>'项目模块数据','class_teacher'=>'班级教师关系','student_class'=>'班级学生关系'); ?>
        <?php $relation = array('class'=>'无','companys'=>'无','department'=>'无','teacher'=>'教师专业模块','tag'=>'无','student'=>'客户模块','project'=>'学生模块 教师模块 班级模块','class_teacher'=>'班级模块 教师模块','student_class'=>'班级模块 学生模块'); ?>
        <?php foreach($model as $key => $val): ?>
        	<ul style="margin-left:100px; width:800px; height:30px;">
            	<form action="<?php echo $this->baseUrl;?>/excel/upload" method="post" enctype="multipart/form-data" /> 
            	<span style="width:100px; line-height:27px;"><?php echo $val; ?></span>
                <span id="span_<?php echo $key; ?>">
                	<a href="<?php echo $this->baseUrl;?>/public/template/<?php echo $key;?>.xls" class="button-100" style="width:100px; line-height:23px; padding:4px 10px; text-decoration:none">下载模板</a>
                	<input type="hidden" name="model" value="<?php echo $key;?>" id="model" />
                    <input type="file" name="files" />
                    <input type="submit" class="button" value="批量上传" onclick="return window.confirm('是否确认批量上传数据无误？请仔细检查，慎重操作！')?true:false;" /> 
                    依赖模块：<?php echo $relation[$key]; ?>
                </span>
                <span style="display:none; color:red;">已完成<input id="input_<?php echo $key; ?>" value="0" type="hidden" /></span>
                </form>
        	</ul>
        <?php endforeach; ?>
        <ul style="margin-left:90px; width:800px; margin-top:10px;">
        	<a href="<?php echo $this->baseUrl;?>/excel/index?step=2" id="next_step" class="button-100" style="width:80px; padding:0px 10px; text-decoration:none; display:none; text-align:center">下一步</a>
        </ul>
        <ul style="margin-left:100px; width:800px; margin-top:10px;">
        导入方法说明：<br />
		1.下载对应模块模板<br />
        2.根据模板格式填写数据<br />
        3.上传模板数据<br />
        4.点击确认按钮<br />
        </ul>
        <script>
		$(document).ready(function(){
			$("#a_class").click(function(){
				$(this).parent().next().css({"display":"inline"}); 
				$(this).parent().next().children().val(1); 
				$(this).siblings().remove();
				$(this).remove();
				v1 = $("#input_class").val();
				v2 = $("#input_teacher").val();
				v3 = $("#input_company").val();
				v4 = $("#input_tag").val();
			});
			$("#a_teacher").click(function(){
				$(this).parent().next().css({"display":"inline"}); 
				$(this).parent().next().children().val(1); 
				$(this).siblings().remove();
				$(this).remove();
				v1 = $("#input_class").val();
				v2 = $("#input_teacher").val();
				v3 = $("#input_company").val();
				v4 = $("#input_tag").val();
			});
			$("#a_company").click(function(){
				$(this).parent().next().css({"display":"inline"}); 
				$(this).parent().next().children().val(1); 
				$(this).siblings().remove();
				$(this).remove();
				v1 = $("#input_class").val();
				v2 = $("#input_teacher").val();
				v3 = $("#input_company").val();
				v4 = $("#input_tag").val();
			});
			$("#a_tag").click(function(){
				$(this).parent().next().css({"display":"inline"}); 
				$(this).parent().next().children().val(1); 
				$(this).siblings().remove();
				$(this).remove();
				v1 = $("#input_class").val();
				v2 = $("#input_teacher").val();
				v3 = $("#input_company").val();
				v4 = $("#input_tag").val();
			});
		});
		</script>
	</div>
</div>

<!--底部-->
<?php echo $this->partial('common/footer.html') ?>
</body>
</html>

